//
//  NSString+JPF.h
//  JPFCore
//
//  Created by JPFei on 2019/3/20.
//  Copyright © 2019 JPF All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (JPF)

+ (CGSize)getSizeFormString:(NSString *)str maxW:(CGFloat)maxW font:(UIFont *)font;


//sha1加密
- (NSString*)sha1;

//md5加密
- (NSString *)md5String;

- (NSString *)fileExtend;

- (NSString *)toEncodePercentEscapeString;
- (NSString *)toDecodePercentEscapeString;

- (NSString *)trimString;
- (NSString *)trimString:(NSString *)trim;

#pragma mark - 数据校验
- (BOOL)isValidateEmail;
//1开头的11位数
- (BOOL)isValidateMobile;

//是否真实车牌
- (BOOL)isRealRegName;


//是否匹配某正则表达式
- (BOOL)isMatch:(NSString *)strReg;
- (BOOL)isMaxLengthInt:(NSInteger)ilength maxLengFloat:(NSInteger)flength;

//格式化数据3位加“，”分割
- (NSString *)formatNum:(NSString *)str;

//验证身份证
- (BOOL)isVerifyIDCardNumber;


@end

NS_ASSUME_NONNULL_END
